home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Draw / Sources / RectShp.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  1.6 KB  |  66 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                RectShp.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //
  8. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef RECTSHP_H
  13. #define RECTSHP_H
  14.  
  15. #ifndef CONSTANT_H
  16. #include "Constant.h"
  17. #endif
  18.  
  19. #ifndef BASESHP_H
  20. #include "BaseShp.h"
  21. #endif
  22.  
  23. #ifndef BOUNDSHP_H
  24. #include "BoundShp.h"
  25. #endif
  26.  
  27. // ----- Foundation Layer -----
  28.  
  29. #ifndef FWRUNTYP_H
  30. #include "FWRunTyp.h"
  31. #endif
  32.  
  33. //========================================================================================
  34. // class CRectShape
  35. //========================================================================================
  36.  
  37. class CRectShape : public CBoundedShape
  38. {
  39. public:
  40.     FW_DECLARE_CLASS
  41.     FW_DECLARE_AUTO(CRectShape)
  42.  
  43. public:
  44.     CRectShape();
  45.     CRectShape(FW_CReadableStream& archive);
  46.     virtual ~CRectShape();
  47.                 
  48.     // ----- Archiving -----
  49.     static void*         Read(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  50.  
  51.     // ----- Shape -----
  52.     virtual void        GetClipRegion(Environment* ev, ODShape* clipRegion);
  53.     virtual ODShape*    CreateShapeOutline(Environment *ev);
  54.     
  55.     virtual FW_Boolean    HitTest(Environment *ev, FW_CGraphicContext& gc, const FW_CMouseEvent& theMouseEvent) const;
  56.     virtual void        RenderShape(Environment* ev, ODFacet* facet, FW_CGraphicContext& gc);
  57.  
  58. protected:
  59.     CRectShape(unsigned short shapeType, unsigned short renderVerb);
  60.  
  61. private:
  62.     virtual void         OutlineShape(FW_CGraphicContext& gc, const FW_CInk& ink, const FW_CStyle& style, const FW_CRect& rect);
  63. };
  64.  
  65. #endif
  66.